import { defineStore } from 'pinia'

export const appSettingStore = defineStore('appSetting', {
  persist: true,
  state() {
    return {
      themeColor: '#20894d',
      locale: 'zh-CN',
      dark: false
    }
  },
  actions: {
    setThemeColor(themeColor: string) {
      this.themeColor = themeColor
    },
    setLocale(locale) {
      this.locale = locale
    },
    setDark(isDark) {
      this.dark = isDark
    }
  }
})
